package com.dx.architectureddd.app.chain.init;

import com.dx.architectureddd.api.dto.req.FinishCmd;
import com.dx.architectureddd.common.dp.pipeline.ContextHandler;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 * 奖励初始化
 *
 * @author xin.deng
 * @date 2023/09/24
 */
@Slf4j
@Component
public class RewardInit implements ContextHandler<InitContext> {
    @Override
    public boolean handle(InitContext context) {
        FinishCmd finishCmd = new FinishCmd();
        finishCmd.setCode("001");
        finishCmd.setName("第一个demo");
        context.setFinishCmd(finishCmd);
        log.info("链执行到最后一步");
        return true;
    }
}
